package com.lanou.mapper;


import com.lanou.bean.ShoppingBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by dllo on 18/3/19.
 */
public interface ShoppingCartMapper {

    void addCart(@Param(value = "commodityId") Integer commodityId,
                 @Param(value = "colorId") Integer colorId,
                 @Param(value = "size") Integer sizeId,
                 @Param(value = "userId") Integer userId,
                 @Param(value = "count") Integer count,
                 @Param(value = "img") String img,
                 @Param(value = "price") String price);


    String getImgId(@Param(value = "commodity") Integer commodity);

    String getPriceId(@Param(value = "commodityId") Integer commodityId);

    List<ShoppingBean> selectUserCart(@Param(value = "userId") Integer userId);

    String getCommodityNameById(@Param(value = "CommodityId") Integer commodityId);

    String getColorById(@Param(value = "cart_id") Integer cart_id);

    String getSrcById(@Param(value = "cart_id") Integer cart_id);

    String getCountById(@Param(value = "cart_id") Integer cart_id);

    String getPriceById(Integer commodity_id);
}
